<?php

//财务部门（叶子节点类）
class FinanceDepartment extends Company
{
    private $name;

    public function __construct($name)
    {
        $this->name = $name;
    }

    public function add(Company $company)
    {
        fwrite(STDOUT, '不支持' . "\n");
    }

    public function remove(Company $company)
    {
        fwrite(STDOUT, '不支持' . "\n");
    }

    public function display($depth)
    {
        fwrite(STDOUT, str_repeat('-', $depth) . $this->name . "\n");
    }

    public function lineOfDuty()
    {
        fwrite(STDOUT, "{$this->name} 公司收支管理\n");
    }
}